package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.AnnualRebateApprovalEnum;
import com.chenfan.mcn.enums.ArchivingStatusEnum;
import com.chenfan.mcn.model.AnnualRebateApproval;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
import java.util.Objects;

/**
 * @Author liuyang
 * @Date 2021/3/3
 * @Time 9:48
 * @Version V1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class AnnualRebateVO extends AnnualRebateApproval {

    private Long flowId;

    private List<Long> flowIds;

    private String flowStatusName;

    private String customerName;

    private String approvalStatusName;

    public String getApprovalStatusName() {
        return AnnualRebateApprovalEnum.getStatusName(getApprovalStatus());
    }

    /**
     * 归档状态名称
     */
    private String archivingStatusName;

    public String getArchivingStatusName() {
        if (Objects.nonNull(getArchivingStatus())) {
            return ArchivingStatusEnum.getStatusName(getArchivingStatus());
        }
        return null;
    }
}
